package com.yugao.fintech.libra.stat.service.impl;

import com.yugao.fintech.libra.stat.api.StatFacadeApi;
import com.yugao.fintech.libra.stat.api.constant.StatisticCons;
import com.yugao.fintech.libra.stat.handler.AbstractStatisticHandler;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;

@Service
@Primary
public class StatFacadeApiImpl implements StatFacadeApi {
    @Override
    public void statAccessTask() {
        AbstractStatisticHandler.getHandler(StatisticCons.Type.ACCESS).execTask(TenantContextHolder.get().getTenantId());
    }

    @Override
    public void statLoginTask() {
        AbstractStatisticHandler.getHandler(StatisticCons.Type.LOGIN_LOGOUT).execTask(TenantContextHolder.get().getTenantId());
    }
}
